# Contributor: Duncan Bellamy <dunk@denkimushi.com>
# Maintainer: Duncan Bellamy <dunk@denkimushi.com>
pkgname=dpdk
pkgver=22.03
pkgrel=0
pkgdesc="Data Plane Development Kit"
url="https://dpdk.org/"
# s390x, riscv64 is not supported
arch="all !s390x !riscv64"
license="BSD-3-Clause AND GPL-2.0"
# at least half tests fail on each platform
options="!check"
makedepends="
	bsd-compat-headers
	doxygen
	dtc-dev
	elfutils-dev
	meson
	jansson
	libbsd-dev
	libexecinfo-dev
	libpcap-dev
	linux-headers
	numactl
	py3-elftools
	py3-sphinx
	zlib-dev
	"
subpackages="$pkgname-test $pkgname-examples $pkgname-static $pkgname-dev $pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/dpdk/dpdk/archive/v$pkgver.tar.gz
	01-ppc.patch
	"

build() {
	abuild-meson -Denable_docs=true . output
	meson compile ${JOBS:+-j ${JOBS}} -C output
}

check() {
	meson test --no-rebuild -v -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output
}

examples() {
	amove usr/share/dpdk/examples
}

test() {
	amove usr/bin/$pkgname-test*
}
sha512sums="
ff80a9f87e71cd743ea5e62f515849bc6746fe7496a0d4b63ecf2bfe0d88da74f0e6c0257c07838c1f9ff41abd81827932b97731fb0fce60d56a8bab7e32347c  dpdk-22.03.tar.gz
ce2c7d9cb817c26ffaf8ee6073c56182a9bcd1b1e83162bcbc8ee76c7950f3e64eb6847839ab7efaac0148f5666561e758e147339294f279074cee77db208be4  01-ppc.patch
"
